package com.atguigu.d_return;

public class Demo {
    public static void main(String[] args) {
        show(10);

        int max = getMax(20, 10);
        System.out.println("max = " + max);

        int max1 = getMax(10, 20);
        System.out.println("max1 = " + max1);
    }

    public static int getMax(int a,int b){
        if (a > b){
            return a;
        }else {
            return b;
        }
    }

    public static void show(int num){
        for (int i = 1; i <= num; i++) {
            if (i == 5){
                return;
            }
            System.out.println("Hello" + i);

        }
    }
}
